<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="circle_style.css"/>
</head>
<body>
<header class="aui-bar aui-bar-nav"style="background-color: #ffffff; height: 20pt" id="aui-header">
    <a class="aui-btn aui-pull-left" tapmode onclick="closeWin()">
        <span class="aui-iconfont aui-icon-left" style="color: #000000"></span>
    </a>
    <div class="aui-title" style="background-color: #ffffff;color: #000000;">发表攻略</div>
    <div class="next_btn" onclick="Next()" >
        <h3 >下一步</h3>
    </div>
</header>
<footer class="aui-bar aui-bar-tab" id="footer">
    <div class="aui-bar-tab-item" tapmode onclick="UIAlbumBrowser_imagePicker()">
        <span class="aui-iconfont aui-icon-phone"></span>
    </div>
    <div class="aui-bar-tab-item" tapmode>
        <span class="aui-iconfont aui-icon-share"></span>
    </div>
    <div class="aui-bar-tab-item" tapmode>
        <span class="aui-iconfont aui-icon-my"></span>
    </div>
    <div class="aui-bar-tab-item" tapmode>
        <span class="aui-iconfont aui-icon-star"></span>
    </div>
</footer>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/aui-tab.js"></script>
<script type="text/javascript">
    var header = $api.byId('aui-header');
    var headerPos = $api.offset(header);
    var cImage =0;
    var cimgs=[];
    var body_h = $api.offset($api.dom('body')).h
    var fh = $api.offset($api.dom('footer')).h;

    apiready = function(){
        api.parseTapmode();

        api.openFrame({
            name: 'circle_strategy_release_frm',
            url: 'circle_strategy_release_frm.html',
            bounces: true,
            rect: {
                x: 0,
                y: headerPos.h,
                w: 'auto',
                h: 'auto',
                marginBottom:fh
            }
        })


    };
    function Next() {
        var jsFun = 'postStrategy()';
        api.execScript({
            frameName:'circle_strategy_release_frm',
            script:jsFun
        })
    }
    function UIAlbumBrowser_imagePicker() {
        api.getPicture({
            sourceType:'album',
            encodingType:'jpg',
            mediaValue:'pic',
            destinationType:'url',
            allowEdit:true,
            quality:100,
            saveToPhotoAlbum:false
        },function (ret,err) {
            if(ret){
                cImage = cImage +1 ;
                api.sendEvent({
                    name:'photoSelected',
                    extra:{
                        path:JSON.stringify(ret.data)
                    }
                });
            }
            else {
                alert(JSON.stringify(err))
            }
        })

    }

    function closeWin(){
        api.closeWin({
        });
    }
</script>
</html>